home *** CD-ROM | disk | FTP | other *** search
/ Virtual Top Model / Virtual Top Model - Disc 1.iso / modulos / intro.dxr / 00032.ls < prev    next >
Encoding:
Text File  |  1997-04-02  |  1.0 KB  |  41 lines

  1. on exitFrame
  2.   go(the frame)
  3. end
  4.  
  5. on keyDown
  6.   global sCadena, nError, bVideoNormal, bSalto, sModuloInicio, bPrimeraVez
  7.   if the key = RETURN then
  8.     if sCadena = "VTM" then
  9.       if bSalto and not bPrimeraVez then
  10.         set CD to BuscaCd()
  11.         if CD <> EMPTY then
  12.           go("inicio", CD & "\modulos\" & sModuloInicio)
  13.         else
  14.           quit()
  15.         end if
  16.       else
  17.         go("correcto" & bVideoNormal)
  18.       end if
  19.     else
  20.       set nError to nError + 1
  21.       if nError > 2 then
  22.         go("Error2_" & bVideoNormal)
  23.       else
  24.         go("Error1_" & bVideoNormal)
  25.       end if
  26.     end if
  27.   else
  28.     if (the key = BACKSPACE) or (the keyCode = 117) then
  29.       set sCadena to the text of member "password"
  30.       set sCadena to chars(sCadena, 1, length(sCadena) - 1)
  31.       put sCadena into field "password"
  32.     else
  33.       set sCaracter to mayusculas(the key)
  34.       if length(sCadena) < 5 then
  35.         set sCadena to sCadena & sCaracter
  36.         put sCadena into field "password"
  37.       end if
  38.     end if
  39.   end if
  40. end
  41.